<template>
	<view>
		<home v-if="PageCur=='home'"></home>
		<audit v-if="PageCur=='audit'"></audit>
		<search v-if="PageCur=='search'"></search>
		<mine v-if="PageCur=='mine'"></mine>
		
		<view class="cu-bar tabbar bg-white shadow foot">
<!-- 			<view class="action" @click="NavChange" data-cur="home">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/home' + [PageCur=='home'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='home'?'text-green':'text-gray'">首页</view>
			</view> -->
			<view class="action" @click="NavChange" data-cur="audit">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/audit' + [PageCur == 'audit'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='audit'?'text-green':'text-gray'">待办</view>
			</view>
			<view class="action" @click="NavChange" data-cur="search">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/search' + [PageCur == 'search'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='search'?'text-green':'text-gray'">消息</view>
			</view>
			<view class="action" @click="NavChange" data-cur="mine">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/mine' + [PageCur == 'mine'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='mine'?'text-green':'text-gray'">我的</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
		return {
				PageCur: 'audit'
			}
		},
		methods: {
			NavChange: function(e) {
				this.PageCur = e.currentTarget.dataset.cur
			}
		}
	}
</script>

<style>

</style>
